from pydantic import BaseModel
from datetime import datetime
from typing import List

class FileResponse(BaseModel):
    """文件响应模型"""
    uid: int
    file_id: str
    file_name: str
    file_path: str
    create_date: datetime
    user_id: str
    
    class Config:
        from_attributes = True


class KnowBaseResponse(BaseModel):
    """知识库响应模型"""
    uid: int
    know_base_id: str
    know_base_name: str
    create_date: datetime
    create_user_id: str

    class Config:
        from_attributes = True


class TextVectorResponse(BaseModel):
    """文本向量响应模型"""
    uid: int
    vector_id: str

    text_content: str
    text_vector: List[float]

    file_id: str
    file_name: str
    know_base_id: str

    create_date: datetime
    user_id: str

    class Config:
        from_attributes = True

class ImageVectorResponse(BaseModel):
    """图片向量响应模型"""
    uid: int
    vector_id: str

    image_path: str
    image_vector: List[float]

    image_desc: str
    desc_vector: List[float]

    file_id: str
    file_name: str
    know_base_id: str

    create_date: datetime
    user_id: str

    class Config:
        from_attributes = True


